<script setup lang="ts">
import {useLocaleStore} from '@/store/locale'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import en from 'element-plus/es/locale/lang/en'
import { computed } from 'vue'

const localeStore = useLocaleStore()
const localeList = new Map([
  ["zh-cn", zhCn],
  ["en", en]
])
const locale = computed(()=>localeList.get(localeStore.locale))
</script>

<template>
  <ElConfigProvider :locale="locale">
    <RouterView />
  </ElConfigProvider>
</template>

<style scoped></style>
